package com.donger.auth.exception;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Getter;
import org.springframework.security.oauth2.common.exceptions.OAuth2Exception;

@JsonSerialize(using = BootAuth2ExceptionSerializer.class)
public class BootOauth2Exception extends OAuth2Exception {
    @Getter
    private String errorCode;

    public BootOauth2Exception(String msg, String errorCode) {
        super(msg);
        this.errorCode = errorCode;
    }

    public BootOauth2Exception(String msg) {
        super(msg);
    }
}
